/**
 * ===========================================================================
 * 版权所有 湖南免了么网络科技有限公司，并保留所有权利。
 * 网站地址: http://www.mianle.me
 * ===========================================================================
 * 14:28 2018/6/26
 */
package com.mianle.userapi.service.task03;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

/**
 * @Author: yiyuan
 * @Description:
 * @Date: Created in 14:28 2018/6/26
 *
 */
@RestController
@Slf4j
public class Task03Controller {

    @Autowired
    private DynamicTaskConfigurer dynamicTaskConfigurer;

    //@RequestMapping("getTask")
    public String getTask() {
        List<TimingTask> tasks = new ArrayList<TimingTask>();
        tasks.add(new TimingTask(1, "0/30 * * * * ?"));
        dynamicTaskConfigurer.refreshTasks(tasks);
        return "";
    }
}
